{php include wl_template('common/header');}
<ul class="nav nav-tabs">
	<li class="active"><a href="#">分组列表</a></li>
</ul>
<div class="app-content">
	<div class="app-filter">
		<div class="filter-action">
			<a href="{php echo web_url('area/areaagent/groupEdit')}" class="btn btn-primary">添加分组</a>
		</div>
	</div>
	<div class="app-table-list">
		<div class="table-responsive">
			<table class="table table-hover">
				<thead>
					<tr>
						<th>分组名称</th>
						<th>应用权限</th>
						<th>是否默认</th>
						<th>是否开启</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					{loop $groups $pcate}
					<tr>
						<td>
							{$pcate['name']}
						</td>
						<td>
							{if !empty($pcate['package'])}
							{loop $pcate['package'] $plugin}
								{if $plugins[$plugin]['name']}{$plugins[$plugin]['name']}；{/if}
							{/loop}
							{else}
							包含所有插件
							{/if}
						</td>
						<td>
							{if $pcate['isdefault'] == 1}<label class='label label-success'>是</label>{else}<label class='label label-default'>否</label>{/if}
						</td>
						<td>
							{if $pcate['enabled'] == 1}<label class='label label-success'>开启</label>{else}<label class='label label-default'>关闭</label>{/if}
						</td>
						<td>
							<a href="{php echo web_url('area/areaagent/groupEdit', array('id' => $pcate['id']));}">编辑</a> -
							<a href="{php echo web_url('area/areaagent/groupDelete', array('id' => $pcate['id']));}" data-toggle="ajaxRemove" data-confirm="确定要删除当前分组吗？">删除</a>
						</td>
					</tr>
					{/loop}
				</tbody>
			</table>
		</div>
		<div class="app-table-foot clearfix">
			<div class="pull-left">
				
			</div>
			<div class="pull-right">
				{$pager}
			</div>
		</div>
	</div>
</div>
{php include wl_template('common/footer');}